Skip to content

Conversation

@zeitlinger
Copy link
Member

No description provided.

@zeitlinger zeitlinger self-assigned this Nov 20, 2025
@zeitlinger zeitlinger requested a review from a team as a code owner November 20, 2025 16:05
@zeitlinger zeitlinger changed the title add nullaway to spring jms add nullaway to spring jms (part 2) Nov 21, 2025
return null;
}
// suppress receive span creation in jms instrumentation
@SuppressWarnings("NullAway") // request is typed as Void
Copy link
Member

@jaydeluca jaydeluca Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if it would make sense to add @Nullable to the parameter in suppressSpan (and all the other downstream effects of that) to avoid having to suppress this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that - and it's not working (have to look up the details if required)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check? I'm asking because the reason "request is typed as Void" doesn't really seem correct here. Rather the reason seems that the method really does accept Nullable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InstrumenterUtil.suppressSpan() calls spanKindExtractor.extract(request) which doesn't accept a null request. Here it works because the instrumenter uses SpanKindExtractor.alwaysConsumer() that doesn't use the request.
The comment // request is typed as Void is misleading as here request is MessageWithDestination and the response is Void.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants